<ui:composition
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:p="http://primefaces.org/ui"
	xmlns:pe="http://primefaces.org/ui/extensions"
	xmlns:b="http://bootsfaces.net/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	<div id="dados_responsavel">
		<ui:repeat var="responsavel" value="#{alunoMBean.responsaveis}">
			<b:row>
				<b:column col-lg="6">
					<p:outputLabel value="#{msg.label_nome_responsavel}:" for="nome_responsavel"/>
					<p:inputText id="nome_responsavel" label="#{msg.label_nome_responsavel}" value="#{responsavel.nome}" size="69" maxlength="80" validator="responsavelValidator" />
				</b:column>
				<b:column col-lg="6">
					<p:outputLabel value="#{msg.label_relacao}:" for="responsavel_relacao" styleClass="label_responsavel_relacao" />
					<p:selectOneMenu value="#{responsavel.relacao}" id="responsavel_relacao" styleClass="select_responsavel_relacao" validator="responsavelValidator">
						<f:selectItem noSelectionOption="true" itemLabel="#{msg.label_selecione}" itemValue=""/>
						<f:selectItems value="#{alunoMBean.relacoes}" var="relacao" itemLabel="#{relacao.valor}" itemValue="#{relacao}"/>
					</p:selectOneMenu>
				</b:column>
			</b:row>
			<br/>
			<b:row>
				<b:column col-lg="4">
					<p:outputLabel value="#{msg.label_cpf}:" for="responsavel_cpf" />
					<p:inputMask id="responsavel_cpf" label="#{msg.label_cpf}" value="#{responsavel.documentacao.cpf}" size="43" mask="#{msg.mascara_cpf}" /> 
				</b:column>
				<b:column col-lg="4">
					<p:outputLabel value="#{msg.label_email}:" for="responsavel_email" />
					<p:inputText id="responsavel_email" label="#{msg.label_email}" value="#{responsavel.contato.email1}" size="43" maxlength="80" />
				</b:column>
				<b:column col-lg="4">
					<p:outputLabel value="#{msg.label_responsavel_financeiro}:" for="responsavel_financeiro" />
					<p:selectBooleanCheckbox id="responsavel_financeiro" label="#{msg.label_responsavel_financeiro}" value="#{responsavel.responsavelFinanceiro}" styleClass="responsavel_financeiro" />
				</b:column>
			</b:row>
			<br/>	
			<b:row>
				<b:column col-lg="4">
					<p:outputLabel value="#{msg.label_telefone_residencial}:" for="telefone_residencial" />
					<p:inputMask id="telefone_residencial" label="#{msg.label_telefone_residencial}" value="#{responsavel.contato.telefone1}" mask="#{msg.mascara_telefone}" size="43" /> 
				</b:column>
				<b:column col-lg="4">
					<p:outputLabel value="#{msg.label_telefone_comercial}:" for="telefone_comercial" />
					<p:inputMask id="telefone_comercial" label="#{msg.label_telefone_comercial}" value="#{responsavel.contato.telefone2}" mask="#{msg.mascara_telefone}" size="43" />
				</b:column>
				<b:column col-lg="4">
					<p:outputLabel value="#{msg.label_telefone_celular}:" for="telefone_celular" />
					<p:inputMask id="telefone_celular" label="#{msg.label_telefone_celular}" value="#{responsavel.contato.telefone3}" mask="#{msg.mascara_telefone}" size="43" />
				</b:column>
			</b:row>
			<br/>
			<b:row>
				<b:column col-lg="4">
					<p:outputLabel value="#{msg.label_logradouro}:" for="responsavel_logradouro" />
					<p:selectOneMenu value="#{responsavel.endereco.logradouro}" id="responsavel_logradouro" styleClass="select_responsavel_logradouro" >
						<f:selectItem noSelectionOption="true" itemLabel="#{msg.label_selecione}" itemValue=""/>
						<f:selectItems value="#{alunoMBean.comboLogradouros}" var="logradouro" itemLabel="#{logradouro.valor}" itemValue="#{logradouro}"/>
					</p:selectOneMenu> 
				</b:column>
				<b:column col-lg="8">
					<p:outputLabel value="#{msg.label_endereco}:" for="responsavel_endereco" />
					<p:inputText id="responsavel_endereco" label="#{msg.label_endereco}" value="#{responsavelMBean.responsavel.endereco.complemento}" size="94" maxlength="200" />
				</b:column>
			</b:row>
			<br/>
			<b:row>
				<b:column col-lg="4">
					<p:outputLabel value="#{msg.label_bairro}:" for="endereco_bairro" />
					<br/>
					<p:inputText id="endereco_bairro" label="#{msg.label_bairro}" value="#{responsavelMBean.responsavel.endereco.bairro}" size="43" maxlength="100" />
				</b:column>
				<b:column col-lg="4">
					<p:outputLabel value="#{msg.label_cidade}:" for="endereco_cidade" />
					<p:inputText id="endereco_cidade" label="#{msg.label_cidade}" value="#{responsavelMBean.responsavel.endereco.cidade}" size="43" maxlength="100" />
				</b:column>
				<b:column col-lg="2">
					<p:outputLabel value="#{msg.label_estado}:" for="endereco_estado" />
					<p:selectOneMenu value="#{responsavelMBean.responsavel.endereco.estado}" id="endereco_estado" styleClass="select_endereco_estado">
						<f:selectItem noSelectionOption="true" itemLabel="#{msg.label_selecione}" itemValue=""/>
						<f:selectItems value="#{responsavelMBean.comboEstados}" var="estado" itemLabel="#{estado.sigla}" itemValue="#{estado}"/>
					</p:selectOneMenu> 
				</b:column>
				<b:column col-lg="2">
					<p:outputLabel value="#{msg.label_cep}:" for="endereco_cep" />
					<p:inputMask id="endereco_cep" label="#{msg.label_cep}:" value="#{responsavelMBean.responsavel.endereco.cep}" mask="#{msg.mascara_cep}" size="16"/>
				</b:column>
			</b:row>
			<div class="clear"></div>
			<hr/>
		</ui:repeat>
	</div>
</ui:composition>